package com.label.Model.Do;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@TableName("message")
@Data
public class Message {

    @TableId(value = "message_id",type = IdType.ASSIGN_ID)
    private Long messageId;

    @TableField("sender_id")
    private String senderId;

    @TableField("receiver_id")
    private String receiverId;

    @TableField("status")
    private Integer status;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @TableField("sender_name")
    private String senderName;

    @TableField("receiver_name")
    private String receiverName;

    @TableField("message_info_id")
    private String messageInfoId;

    @TableField(exist = false)
    private MessageInfo messageInfo;

    public Message(){}

    public Message(String senderId,String receiverId,Integer status,String senderName,String receiverName,String messageInfoId){
        this.receiverId=receiverId;
        this.senderId=senderId;
        this.senderName=senderName;
        this.receiverName=receiverName;
        this.status=status;
        this.messageInfoId=messageInfoId;
    }
}
